﻿<!-- #include file="mymin.asp" -->
<%
If Request("submit") <> "" Then

timeDiff = Trim(Request.Form("time"))
If timeDiff <> "" Then
	If Not IsDate(timeDiff) Then Call Error("<card title='出错'><p>时间无效,格式2011-11-11 11:11:11！")
	If Second(timeDiff)=0 Then Call Error("<card title='出错'><p>时间无效,格式2011-11-11 11:11:11！")
	timeDiff=DateDiff("s", Now, timeDiff)
End If


'----------------------------------------------------------------
'	生成time.asp文件
'----------------------------------------------------------------
dim HU_Config,HU_File

HU_File= "../../config/time.asp"'生成bbs.asp文件路径

HU_Config="<"&"%"
HU_Config=HU_Config+chr(13)&chr(10)&"timeDiff="""&timeDiff&""""
HU_Config=HU_Config+chr(13)&chr(10)&"%"&">"
Call savetofile(HU_Config,HU_File)

If timeDiff="" Then timeDiff=0

'避免系统异常退出
conn.execute("update 74hu_admin set lastdate='"&dateadd("s", timeDiff, Now)&"' where id="&keyid)

Response.Write "<card id='card2' title='正在返回' ontimer='index.asp?sid="&sid&"'><timer value='10'/><p>"
Response.Write "成功设置！正在返回..."
else%>
<card id="index" title="网站时间配置">
<p align="left">
系统时间：<%=Now%><br/>
<%
If timeDiff<>"" Then
	If IsNumeric(timeDiff) Then
		w "修正时间："&time_now&"<br/>"
	End If
End If
%>
当前正确时间:<input name="time<%=time_r%>" type="text" value=""/><br/>
<anchor>保存配置
<go href="time.asp?submit=true&amp;sid=<%=sid%>" method="post">
<postfield name="time" value="$(time<%=time_r%>)"/>
</go>
</anchor><br/>
温馨提示：<br/>
1、时间格式2011-11-11 11:11:11<br/>
2、留空保存还原为系统默认时间<br/>
<%end if%><br/>
<a href="index.asp?sid=<%=sid%>">[网站配置]</a><%call Last%>